package com.supplychain.scm.core.common.validator.file;



import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @author liyichuan
 * @date 2022/06/11
 */
@Target({ ElementType.FIELD,ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = FileSizeConstraintValidator.class)
public @interface FileSize {

    boolean required() default true;

    String message() default "文件大小超过限制";

    Class<?>[] groups() default { };

    Class<? extends Payload>[] payload() default { };

    String value()  ; // 单位kb
}
